# !/usr/bin/env/ python
# -*- coding: utf-8 -*-#

# -------------------------------------------------------------------------------
# Name:         CommonBusiness.py
# Author:       HaoWei
# Date:         2021/11/12 11:05
# Description:  公共方法模块
# -------------------------------------------------------------------------------

from time import sleep
from main_process import TaskPublic


class CommonBusiness(TaskPublic.TaskPublic):

    def change_tree(self):
        """
        切换tree内容
        :return:
        """
        self.b.switch_to.default_content()
        self.b.switch_to.frame('ifDefault')
        self.b.switch_to.frame('frmContent')
        self.b.switch_to.frame('Tree')

    def Change_frame_head(self):
        """
        头部信息切换iframe
        :return:
        """
        self.b.switch_to.default_content()
        self.b.switch_to.frame('ifDefault')
        self.b.switch_to.frame(self.b.find_element_by_css_selector('html > frameset > frame:nth-child(1)'))

